package adminrouter

import (
	"vpn-management-server/src/controller/admincontroller"
	"vpn-management-server/src/interceptor/admininterceptor"
	"vpn-management-server/src/router/routermodel"
)

var adminRouter = routermodel.NewRouter()

func init() {
	adminRouter.RegisterHandleSet("login", admininterceptor.AdminLoginValidator, admincontroller.Login, nil)
	adminRouter.RegisterHandleSet("addAdmin", admininterceptor.AdminValidator, admincontroller.AddAdmin, admininterceptor.AddAdminLogToChan)
	adminRouter.RegisterHandleSet("reset", admininterceptor.AdminResetValidator, admincontroller.Reset, admininterceptor.ResetAdminLogToChan)
	adminRouter.RegisterHandleSet("deleteAdminByID", admininterceptor.AdminNameInfoValidator, admincontroller.DeleteAdminByID, admininterceptor.DeleteAdminLogToChan)
	adminRouter.RegisterHandleSet("getAllAdmins", admininterceptor.AdminRankValidator, admincontroller.GetAllAdmins, nil)
	adminRouter.RegisterHandleSet("getCurrAdmin", nil, admincontroller.GetCurrAdmin, nil)
	adminRouter.RegisterHandleSet("addUGroupAdmin", admininterceptor.UGroupAdminValidator, admincontroller.AddUGroupAdmin, admininterceptor.AddUGroupAdminLogToChan)

}
